<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PersonInmunizationsForm.aspx.cs" Inherits="Meditek.UI.PersonInmunizationsForm" MasterPageFile="~/MasterPage.Master"%>

<%@ Register Assembly="Microsoft.Practices.EnterpriseLibrary.Validation.Integration.AspNet"
    Namespace="Microsoft.Practices.EnterpriseLibrary.Validation.Integration.AspNet"
    TagPrefix="cc1" %>
<asp:Content ID="Content2" ContentPlaceHolderID="Body" runat="server">
<br />
  <asp:FormView ID="EditFormView" runat="server" DefaultMode= "Insert" DataSourceID="PersonInmunizationsDataSource"
	oniteminserting="EditFormView_ItemInserting"  onitemupdating="EditFormView_ItemUpdating" BackColor="#284775" ForeColor="WhiteSmoke" >
	<EditItemTemplate> 
    <table>

	  <tr>
        <td><asp:Label ID="lblPersonInmunizationDisplay" runat="server" Text="Person Inmunization :" /></td> 
		<td>
		  <asp:TextBox ID="txtPersonInmunization" runat="server" Text='<%# Bind("PersonInmunization") %>'
			ReadOnly="true"
			Width = "70px" 
			TextMode="SingleLine"
			/>
			<br />
            <cc1:PropertyProxyValidator ID="personInmunizationValidator" runat="server" ControlToValidate="txtPersonInmunization"
               PropertyName="PersonInmunization" SourceTypeName="Meditek.Entities.PersonInmunizations"></cc1:PropertyProxyValidator>
	    </td>
      </tr>
	  <tr>
        <td><asp:Label ID="lblDateDisplay" runat="server" Text="Date :" /></td> 
		<td>
		  <asp:TextBox ID="txtDate" runat="server" Text='<%# Bind("Date") %>'
			Width = "210px" 
			TextMode="SingleLine"
			/>
			<br />
            <cc1:PropertyProxyValidator ID="dateValidator" runat="server" ControlToValidate="txtDate"
               PropertyName="Date" SourceTypeName="Meditek.Entities.PersonInmunizations"></cc1:PropertyProxyValidator>
	    </td>
      </tr>
	  <tr>
        <td><asp:Label ID="lblidInmunizationDisplay"	runat="server"	Text="Name :" /></td>
        <td>
          <asp:DropDownList ID="drlstidInmunization" runat="server"	SelectedValue='<%# Bind("idInmunization") %>'	Width="100%"
			ondatabinding="drlstidInmunization_DataBinding" AppendDataBoundItems="True">
		      <asp:ListItem Text="(None)" Value="" Selected="True" />
		  </asp:DropDownList>
		  <br />
          <cc1:PropertyProxyValidator ID="idInmunizationValidator" runat="server" ControlToValidate="drlstidInmunization"
             PropertyName="idInmunization" SourceTypeName="Meditek.Entities.PersonInmunizations"></cc1:PropertyProxyValidator>
        </td>
      </tr>	
	  <tr>
        <td><asp:Label ID="lblPersonDisplay"	runat="server"	Text="idPerson :" /></td>
        <td>
          <asp:DropDownList ID="drlstPerson" runat="server"	SelectedValue='<%# Bind("Person") %>'	Width="100%"
			ondatabinding="drlstPerson_DataBinding" AppendDataBoundItems="True">
		      <asp:ListItem Text="(None)" Value="" Selected="True" />
		  </asp:DropDownList>
		  <br />
          <cc1:PropertyProxyValidator ID="personValidator" runat="server" ControlToValidate="drlstPerson"
             PropertyName="Person" SourceTypeName="Meditek.Entities.PersonInmunizations"></cc1:PropertyProxyValidator>
        </td>
      </tr>	
	</table>
	</EditItemTemplate>
	<EmptyDataTemplate>
		<b>PersonInmunizations not found..!</b>
	</EmptyDataTemplate>
	<FooterTemplate>
	  <table>
		<tr>
		  <td><asp:Button ID="btnSave" runat="server"   CausesValidation="True"	CommandName="Insert" Text="Save" CssClass="Button" /></td>
 		  <td><asp:Button ID="btnUpdate" runat="server" CausesValidation="True"  CommandName="Update" Text="Save" CssClass="Button" /></td>
		  <td><asp:Button ID="btnCancel" runat="server" CausesValidation="False" CommandName="Cancel" Text="Go To PersonInmunizations List" PostBackUrl="PersonInmunizationsList.aspx" CssClass="Button" /></td>
        </tr>
	  </table>
	</FooterTemplate>
    </asp:FormView>
	<asp:ObjectDataSource ID="PersonInmunizationsDataSource" runat="server" 
         SelectMethod="GetById" TypeName="Meditek.UI.PersonInmunizationsReference.PersonInmunizationsServiceClient" 
         DataObjectTypeName="Meditek.Entities.PersonInmunizations" InsertMethod="Insert"  UpdateMethod="Update"
         oninserted="PersonInmunizationsDataSource_CommitChanges" onupdated="PersonInmunizationsDataSource_CommitChanges"
         onobjectcreated="PersonInmunizationsDataSource_ObjectCreated" >
            <SelectParameters>
                <asp:QueryStringParameter Name="PersonInmunization" QueryStringField="PersonInmunization" />
            </SelectParameters>
    </asp:ObjectDataSource>
  </asp:Content>    
